package com.mlody.auction;

import javax.swing.SwingUtilities;

import com.mlody.AuctionEventListener;
import com.mlody.SniperListener;

public class AuctionSniper implements AuctionEventListener {
private  SniperListener sniperListener;
private Auction auction;
public AuctionSniper(Auction auction, SniperListener sniperListener) {
this.sniperListener = sniperListener;
this.auction=auction;
}
public void auctionClosed() {
sniperListener.sniperLost();
}
public void currentPrice(int price, int increment) {
    auction.bid(price + increment);
    sniperListener.sniperBidding();

}
}

